
using System;
using Microsoft.SPOT;

namespace mfRCF.Rss
{
    public static class RSSSampleDataFactory
    {
        public static rss CreateRSSSample_Complete()
        {
            var rss = new rss();
            rss.channel.Add(new Channel());
            var channel = rss.channel[0];

            channel.title = "Liftoff News";
            channel.link = "http://liftoff.msfc.nasa.gov/";
            channel.description = "Liftoff to Space Exploration.";
            channel.language = "en-us";
            channel.pubDate = new DateTime(2003, 6, 10, 4, 0, 0);//Tue, 10 Jun 2003 04:00:00 GMT
            channel.lastBuildDate = new DateTime(2003, 6, 10, 9, 41, 0);//Tue, 10 Jun 2003 09:41:01 GMT
            channel.docs = "http://blogs.law.harvard.edu/tech/rss";
            channel.generator = "Weblog Editor 2.0";
            channel.managingEditor = "editor@example.com";
            channel.webMaster = "webmaster@example.com";

            AddFirstItem(channel);
            AddSecondItem(channel);
            AddThirdItem(channel);
            AddFourthItem(channel);

            return rss;
        }

        private static void AddFirstItem(Channel channel)
        {
            var item = new Item();
            channel.item.Add(item);

            item.title = "Star City";
            item.link = "http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp";
            //item.description = "How do Americans get ready to work with Russians aboard the International Space Station? They take a crash course in culture, language and protocol at Russia's &lt;a href=\"http://howe.iki.rssi.ru/GCTC/gctc_e.htm\"&gt;Star City&lt;/a&gt;.";
            item.description = "How do Americans get ready to work with Russians aboard the International Space Station";
            item.pubDate = new DateTime(2003, 6, 13, 9, 39, 21);
            item.guid = "http://liftoff.msfc.nasa.gov/2003/06/03.html#item573";
        }

        private static void AddSecondItem(Channel channel)
        {
            var item = new Item();
            channel.item.Add(item);

            item.link = "http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp";
            //item.description = @"Sky watchers in Europe, Asia, and parts of Alaska and Canada will experience a &lt;a href="http://science.nasa.gov/headlines/y2003/30may_solareclipse.htm"&gt;partial eclipse of the Sun&lt;/a&gt; on Saturday, May 31st.";
            item.description = @"Sky watchers in Europe, Asia, and parts of Alaska and Canada will experience ";
            item.pubDate = new DateTime(2003, 5, 30, 11, 6, 42);
            item.guid = "http://liftoff.msfc.nasa.gov/2003/05/30.html#item572";
        }

        private static void AddThirdItem(Channel channel)
        {
            var item = new Item();
            channel.item.Add(item);

            item.title = "The Engine That Does More";
            item.link = "http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp";
            //item.description = "Before man travels to Mars, NASA hopes to design new engines that will let us fly through the Solar System more quickly.  The proposed VASIMR engine would do that.";
            item.description = "Before man travels to Mars, NASA hopes to design new engines that will let us fly through the Solar System more quickly.";
            item.pubDate = new DateTime(2003, 5, 27, 8, 37, 32);
            item.guid = "http://liftoff.msfc.nasa.gov/2003/05/27.html#item571";
        }

        private static void AddFourthItem(Channel channel)
        {
            var item = new Item();
            channel.item.Add(item);

            item.title = "Astronauts' Dirty Laundry";
            item.link = "http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp";
            //item.description = "Compared to earlier spacecraft, the International Space Station has many luxuries, but laundry facilities are not one of them.  Instead, astronauts have other options.";
            item.description = "Compared to earlier spacecraft, the International Space Station has many luxuries, but laundry facilities are not one of them.";
            item.pubDate = new DateTime(2003, 5, 20, 8, 56, 2);
            item.guid = "http://liftoff.msfc.nasa.gov/2003/05/27.html#item570";
        }
    }
}
